package com.intretech.tj.live.service

import jakarta.enterprise.context.ApplicationScoped


@ApplicationScoped
/**
 *  情景拥堵演示服务
 *
 * @author  Aecric 2025/08/17
 */
class LiveAService(val nodeId: Int) {

    private companion object {
        private val PATH_A_1 = intArrayOf(1, 3, 43, 44, 53, 54, 90, 17, 27, 29, 2)
        private val PATH_A_2 = intArrayOf(54, 55, 56, 58, 59, 88, 61, 38, 36, 39, 47, 48, 49, 43, 44, 53)
        private val PATH_A_3 = intArrayOf(
            15, 27, 29, 2, 13, 28, 30, 31, 32, 70, 71, 68, 69, 25, 21, 19, 18
        )
        private val PATH_A_4 = intArrayOf(25, 21, 19, 18, 32, 35, 38, 36, 39, 37, 30, 29, 2, 1, 4, 87, 85, 82, 67, 69)

        private val PATH_A_5 = intArrayOf(
            66, 83, 84, 86, 5, 7, 8, 11, 93, 12, 14, 74, 22, 26, 79, 78
        )
        private val PATH_A_BUS = intArrayOf(
            46, 48, 49, 43, 44, 53, 54, 90, 17, 14, 74, 77, 75, 81, 80, 76, 78, 66, 83, 84, 86, 5, 3, 43, 44, 45
        )

        // 车辆4 A1 A2
        private val PATH_A1_4 = intArrayOf(
            25, 21, 19, 18, 32, 35, 38, 36, 39, 37, 30, 29, 2, 1, 3, 43, 44, 53, 54, 55, 56, 58, 59, 60, 67, 69
        )
        private val PATH_A2_4 = intArrayOf(
            25, 21, 19, 18, 32, 35, 38, 36, 39, 37, 30, 29, 2, 1, 3, 43, 44, 53, 54, 55, 56, 58, 59, 60, 67, 69
        )

        // 救护车 A1
        private val ROS_A1_R = intArrayOf(
            40, 87, 41
        )

        // 救护车 A2
        private val ROS_A2_R = intArrayOf(
            40, 85, 41
        )

        // 救护车 A3
        private val ROS_A3_R = intArrayOf(
            40, 53, 41
        )

        // 车辆1 A3
        private val PATH_A3_1 = intArrayOf(2, 13, 8, 30, 29)

        // 车辆2 A3
        private val PATH_A3_2 = intArrayOf(56, 58, 59, 88, 61, 38, 89)

        // 巴士 A3
        private val PATH_A3_BUS = intArrayOf(
            53
        )
    }

    private var runtimeNodeId = -1


    public fun stopLiveA() {
        runtimeNodeId = -1
    }



}